using System;
using System.Collections.Generic;
using ShouldIt.Clr.Fluent;
using ShouldIt.Core;

namespace ShouldIt.Clr
{
    public static class FluentShouldExtensions
    {
        public static Should<object, Be<object>> Should(this object o)
        {
            return new Should<object, Be<object>>(o, AssertProvidersContainer.Current);
        }

        public static Should<T, Be<T>> Should<T, U>(this U o) where U : T
        {
            return new Should<T, Be<T>>(o, AssertProvidersContainer.Current);
        }

        public static ShouldEnumerable<T> Should<T>(this IEnumerable<T> e)
        {
            return new ShouldEnumerable<T>(e, AssertProvidersContainer.Current);
        }

        public static ShouldDictionary<TKey, TValue> Should<TKey, TValue>(this IEnumerable<KeyValuePair<TKey, TValue>> d)
        {
            return new ShouldDictionary<TKey, TValue>(d, AssertProvidersContainer.Current);
        }

        public static Should<bool, BeBool> Should(this bool b)
        {
            return new Should<bool, BeBool>(b, AssertProvidersContainer.Current);
        }

        public static Should<bool?, BeNullableBool> Should(this bool? b)
        {
            return new Should<bool?, BeNullableBool>(b, AssertProvidersContainer.Current);
        }

        public static Should<DateTime, BeDateTime> Should(this DateTime d)
        {
            return new Should<DateTime, BeDateTime>(d, AssertProvidersContainer.Current);
        }

        public static Should<DateTime?, BeNullableDateTime> Should(this DateTime? d)
        {
            return new Should<DateTime?, BeNullableDateTime>(d, AssertProvidersContainer.Current);
        }

        public static ShouldString Should(this string s)
        {
            return new ShouldString(s, AssertProvidersContainer.Current);
        }

        public static Should<Guid, BeGuid> Should(this Guid g)
        {
            return new Should<Guid, BeGuid>(g, AssertProvidersContainer.Current);
        }
    }
}